<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登录</title>
    <style>
        body{
            background-image: url("images/绿色背景.jpg");
        }
    </style>
</head>
<body>
<script type="text/javascript">
    function getQueryVariable(variable)
    {
        var query = window.location.search.substring(1);
        var vars = query.split("&");
        for (var i=0;i<vars.length;i++) {
            var pair = vars[i].split("=");
            if(pair[0] == variable){return pair[1];}
        }
        return(false);
    }

    const memberid = getQueryVariable("memberid");
    const password = getQueryVariable("password");

</script>
<div style="
margin-left:auto;
margin-right:auto;
max-width: 500px;
background: #F8F8F8;
padding: 30px 30px 20px 30px;
font: 12px Arial, Helvetica, sans-serif;
color: #666;
border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;">
<form action="member/login" method="post">
    <h2 style="color: #57AA2C">登录模块</h2>
    <hr><br>
    <script type="text/javascript">
        <!--不要问我这个判断是为什么，这是为了处理未登录（url里没带参数）就要创建新队伍的情况-->
        if(memberid!=false){
            document.write('成员ID：<input style="display: block;margin: 0px 0px 5px;" type="text" name="memberid" required="required" value="'+memberid+'" />');
            document.write('<br/>');
            document.write('密码：<input style="\n' +
                'display: block;\n' +
                'margin: 0px 0px 5px;" type="password" name="password" required="required" value="'+password+'" />');
        }
        else{
            document.write('成员ID：<input style="display: block;margin: 0px 0px 5px;" type="text" name="memberid" required="required"  />');
            document.write('<br/>');
            document.write('密码：<input style="\n' +
                'display: block;\n' +
                'margin: 0px 0px 5px;" type="password" name="password" required="required"  />');
        }
    </script>
    <br/>
    <input style="
    background-color: #9DC45F;
border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-border-radius: 5px;
border: none;
padding: 10px 25px 10px 25px;
color: #FFF;
text-shadow: 1px 1px 1px #949494;" type="submit" value="登录"/>

</form>
<br>
<a href="/index.html"><button>返回首页</button></a>
</div>

</body>
</html>